//package com.yunxin.admin.system.api.core.page;
//
//import com.yunxin.admin.system.infra.common.constant.SecurityConstants;
//import com.yunxin.admin.system.infra.framework.resubmit.Resubmit;
//import com.yunxin.admin.system.infra.framework.security.util.SecurityUtils;
//import com.yunxin.admin.system.infra.framework.syslog.AutoLog;
//import com.yunxin.common.result.Result;
//import com.yunxin.core.application.command.page.GetPageConfigInfoCommand;
//import com.yunxin.core.application.command.page.PageConfigInfoCommand;
//import com.yunxin.core.application.dto.page.PageComponentElementInfoDataAdminDTO;
//import com.yunxin.core.application.dto.page.PageConfigInfoDTO;
//import com.yunxin.core.application.service.PageApplicationAdminService;
//import com.yunxin.core.application.service.PageQueryAdminService;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.security.SecurityRequirement;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @author zero°
// * @since 2023-05-29
// */
//@Tag(name = "42.页面配置管理")
//@Slf4j
//@RestController
//@RequestMapping("/core/v1/page/config")
//@RequiredArgsConstructor
//public class PageConfigController {
//
//
//    private final PageQueryAdminService pageQueryAdminService;
//
//    private final PageApplicationAdminService pageApplicationAdminService;
//
//
//    @Operation(summary = "保存页面配置", security = {@SecurityRequirement(name = SecurityConstants.TOKEN_KEY)})
//    @PostMapping("/savePageConfig")
//    @PreAuthorize("@ss.hasPerm('core:page_config:save')")
//    @Resubmit
//    @AutoLog(value = "保存页面配置")
//    public Result<Boolean> savePageConfig(@Validated @RequestBody PageConfigInfoCommand command) {
//        command.setCreator(SecurityUtils.X.getUser().getUsername());
//        return Result.success(pageApplicationAdminService.savePageConfig(command));
//    }
//
//    @Operation(summary = "发布页面配置", security = {@SecurityRequirement(name = SecurityConstants.TOKEN_KEY)})
//    @PostMapping("/releasePageConfig")
//   @PreAuthorize("@ss.hasPerm('core:page_config:release')")
//    @Resubmit
//    @AutoLog(value = "发布页面配置")
//    public Result<Boolean> releasePageConfig(@Validated @RequestBody PageConfigInfoCommand command) {
//        command.setCreator(SecurityUtils.X.getUser().getUsername());
//        return Result.success(pageApplicationAdminService.releasePageConfig(command));
//    }
//
//    @Operation(summary = "获取页面配置", security = {@SecurityRequirement(name = SecurityConstants.TOKEN_KEY)})
//    @PostMapping("/getPageConfig")
//    public Result<PageConfigInfoDTO<PageComponentElementInfoDataAdminDTO>> getPageConfig(@Validated @RequestBody GetPageConfigInfoCommand command) {
//        return Result.success(pageQueryAdminService.getPageConfig(command));
//    }
//
//}
